/**
 * 
 */
package com.pengtu.entity.detect.grade;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import com.pengtu.entity.IdEntity;

/**
 * @author Administrator 分部工程质量鉴定
 */
@Entity
@Table(name="T_Q_GRADE_BRANCH")
public class Branch extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String branchName;
	private String branchValue;
	private String branchCode;
	private String projPart;
	private Double facadePoint;
	private Double checkPoint;
	private String quaLevel;
	private String remark;
	private Double branchPoint;
	private UnitProj unitProj;
	private List<Subentry> subentryList = new ArrayList<Subentry>();

	@Column(name="BRANCHNAME")
	public String getBranchName() {
		return branchName;
	}

	public void setBranchName(String branchName) {
		this.branchName = branchName;
	}

	@Column(name="BRANCHVALUE")
	public String getBranchValue() {
		return branchValue;
	}

	public void setBranchValue(String branchValue) {
		this.branchValue = branchValue;
	}
	
	@Column(name="BRANCHCODE")
	public String getBranchCode() {
		return branchCode;
	}

	public void setBranchCode(String branchCode) {
		this.branchCode = branchCode;
	}
	
	@Column(name="PROJPART")
	public String getProjPart() {
		return projPart;
	}

	public void setProjPart(String projPart) {
		this.projPart = projPart;
	}
	
	
	@Column(name="FACADEPOINT")
	public Double getFacadePoint() {
		return facadePoint;
	}

	public void setFacadePoint(Double facadePoint) {
		this.facadePoint = facadePoint;
	}
	
	@Column(name="CHECKPOINT")
	public Double getCheckPoint() {
		return checkPoint;
	}

	public void setCheckPoint(Double checkPoint) {
		this.checkPoint = checkPoint;
	}
	
	@Column(name="QUALEVEL")
	public String getQuaLevel() {
		return quaLevel;
	}

	public void setQuaLevel(String quaLevel) {
		this.quaLevel = quaLevel;
	}
	
	@Column(name="REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Column(name="BRANCHPOINT")
	public Double getBranchPoint() {
		return branchPoint;
	}

	public void setBranchPoint(Double branchPoint) {
		this.branchPoint = branchPoint;
	}
	
	@OneToMany
	@JoinColumn(name="BRANCHID")
	public List<Subentry> getSubentryList() {
		return subentryList;
	}

	public void setSubentryList(List<Subentry> subentryList) {
		this.subentryList = subentryList;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@ManyToOne(cascade=CascadeType.REMOVE)
	@JoinColumn(name="UNITPROJID")
	@Fetch(FetchMode.JOIN)
	public UnitProj getUnitProj() {
		return unitProj;
	}

	public void setUnitProj(UnitProj unitProj) {
		this.unitProj = unitProj;
	}

	public void addSubentry(Subentry subentry) {
		// TODO Auto-generated method stub
		this.subentryList.add(subentry);
	}
	
	

}
